package cn.wym.ymbill.service.impl

import cn.wym.ymbill.mapper.BillTypeBeenMapper
import cn.wym.ymbill.model.BillTypeBeen
import cn.wym.ymbill.service.IBillTypeService
import org.springframework.stereotype.Service
import javax.annotation.Resource

@Service("BillTypeService")
class BillTypeService : IBillTypeService {

    @Resource
    val billTypeBeenMapper: BillTypeBeenMapper? = null

    override fun deleteByPrimaryKey(id: Int): Int {
        return billTypeBeenMapper?.deleteByPrimaryKey(id)?: -1
    }

    override fun insert(record: BillTypeBeen): Int {
        return billTypeBeenMapper?.insert(record)?: -1
    }

    override fun insertSelective(record: BillTypeBeen): Int {
        return billTypeBeenMapper?.insertSelective(record)?: -1
    }

    override fun selectByPrimaryKey(id: Int): BillTypeBeen? {
        return billTypeBeenMapper?.selectByPrimaryKey(id)
    }

    override fun updateByPrimaryKeySelective(record: BillTypeBeen): Int {
        return billTypeBeenMapper?.updateByPrimaryKeySelective(record)?: -1
    }

    override fun updateByPrimaryKey(record: BillTypeBeen): Int {
        return billTypeBeenMapper?.updateByPrimaryKey(record)?: -1
    }
}